Optimal. Leaf size=17 \[ -\frac {\log (1+\cos (c+d x))}{a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3964, 31}
\begin {gather*} -\frac {\log (\cos (c+d x)+1)}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 3964
Rubi steps
\begin {align*} \int \frac {\tan (c+d x)}{a+a \sec (c+d x)} \, dx &=-\frac {\text {Subst}\left (\int \frac {1}{a+a x} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {\log (1+\cos (c+d x))}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 19, normalized size = 1.12 \begin {gather*} -\frac {2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.03, size = 27, normalized size = 1.59
method | result | size |
derivativedivides | \(\frac {-\ln \left (1+\sec \left (d x +c \right )\right )+\ln \left (\sec \left (d x +c \right )\right )}{d a}\) | \(27\) |
default | \(\frac {-\ln \left (1+\sec \left (d x +c \right )\right )+\ln \left (\sec \left (d x +c \right )\right )}{d a}\) | \(27\) |
risch | \(\frac {i x}{a}+\frac {2 i c}{a d}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{a d}\) | \(39\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.26, size = 17, normalized size = 1.00 \begin {gather*} -\frac {\log \left (\cos \left (d x + c\right ) + 1\right )}{a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.72, size = 19, normalized size = 1.12 \begin {gather*} -\frac {\log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right )}{a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 41 vs.
\(2 (14) = 28\).
time = 2.14, size = 41, normalized size = 2.41 \begin {gather*} \begin {cases} \frac {\log {\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 a d} - \frac {\log {\left (\sec {\left (c + d x \right )} + 1 \right )}}{a d} & \text {for}\: d \neq 0 \\\frac {x \tan {\left (c \right )}}{a \sec {\left (c \right )} + a} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 31, normalized size = 1.82 \begin {gather*} \frac {\log \left ({\left | -\frac {\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1 \right |}\right )}{a d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.21, size = 21, normalized size = 1.24 \begin {gather*} \frac {\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{a\,d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________